package com.itheima.day13work1;

import java.util.concurrent.ArrayBlockingQueue;

public class Cooker implements Runnable {
   private ArrayBlockingQueue<String> abq;
    public Cooker(ArrayBlockingQueue<String> abq) {
        this.abq=abq;
    }

    @Override
    public void run() {
            while (true){
                try {
                    abq.put("泡芙");
                    System.out.println("厨师做好了");
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }

            }    }
}
